package com.example.demo1.entity;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class BaMenu {
    private Integer menuId;

    private String menuName;

    private Integer parentId;


    private String parentMenuName;

    private String menuUrl;

    private String menuIcon;

    private Integer sortNum;

    private String functionRightCode;

    private String state;

    private String createUser;

    private Date createTime;

    private String updateUser;

    private Date updateTime;

    private String remark;
    private List<BaMenu> nodes = new ArrayList<BaMenu>();//子级

    public void addNode(BaMenu ba){
        this.nodes.add(ba);
    }

    public void setNodes(List<BaMenu> nodes) {
        this.nodes = nodes;
    }
    public void setEntity(BaMenu ba){
        setMenuId(ba.getMenuId());
        setParentId(ba.getParentId());
        setFunctionRightCode(ba.getFunctionRightCode());
        setMenuName(ba.getMenuName());
        setMenuIcon(ba.getMenuIcon());
        setMenuUrl(ba.getMenuUrl());
        setSortNum(ba.getSortNum());
        setState(ba.getState());
        setRemark(ba.getRemark());
        setUpdateUser(ba.getUpdateUser());
        setUpdateTime(ba.getUpdateTime());
    }
    public List<BaMenu> getNodes() {
        return nodes;
    }
    public Integer getMenuId() {
        return menuId;
    }

    public void setMenuId(Integer menuId) {
        this.menuId = menuId;
    }

    public String getMenuName() {
        return menuName;
    }

    public void setMenuName(String menuName) {
        this.menuName = menuName;
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public String getParentMenuName() {
        return parentMenuName;
    }

    public void setParentMenuName(String parentMenuName) {
        this.parentMenuName = parentMenuName;
    }

    public String getMenuUrl() {
        return menuUrl;
    }

    public void setMenuUrl(String menuUrl) {
        this.menuUrl = menuUrl;
    }

    public String getMenuIcon() {
        return menuIcon;
    }

    public void setMenuIcon(String menuIcon) {
        this.menuIcon = menuIcon;
    }

    public Integer getSortNum() {
        return sortNum;
    }

    public void setSortNum(Integer sortNum) {
        this.sortNum = sortNum;
    }

    public String getFunctionRightCode() {
        return functionRightCode;
    }

    public void setFunctionRightCode(String functionRightCode) {
        this.functionRightCode = functionRightCode;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getCreateUser() {
        return createUser;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getUpdateUser() {
        return updateUser;
    }

    public void setUpdateUser(String updateUser) {
        this.updateUser = updateUser;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
}